Deprecate gtk_file_chooser_*_new_with_backend(), since GIO is already used
authorCarlos Garnacho <carlos@imendio.com>
Mon, 4 Aug 2008 14:43:53 +0000 (14:43 +0000)
committerCarlos Garnacho <carlosg@src.gnome.org>
Mon, 4 Aug 2008 14:43:53 +0000 (14:43 +0000)
2008-08-04  Carlos Garnacho  <carlos@imendio.com>

        * gtk/gtk.symbols:
        * gtk/gtkfilechooserbutton.[ch]:
        * gtk/gtkfilechooserdefault.[ch]:
        * gtk/gtkfilechooserdialog.[ch]:
        * gtk/gtkfilechooserwidget.[ch]: Deprecate
        gtk_file_chooser_*_new_with_backend(), since GIO is already used
        directly. Fixes #545976.

svn path=/trunk/; revision=20972

ChangeLog
gtk/gtk.symbols
gtk/gtkfilechooserbutton.c
gtk/gtkfilechooserbutton.h
gtk/gtkfilechooserdefault.c
gtk/gtkfilechooserdefault.h
gtk/gtkfilechooserdialog.c
gtk/gtkfilechooserdialog.h
gtk/gtkfilechooserwidget.c
gtk/gtkfilechooserwidget.h

index 9f901c80e0a170a81fb76172bdf765c5760df427..fd2e7c943fbac9a5caed622cca9420088759072d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-08-04  Carlos Garnacho  <carlos@imendio.com>
+
+       * gtk/gtk.symbols:
+       * gtk/gtkfilechooserbutton.[ch]:
+       * gtk/gtkfilechooserdefault.[ch]:
+       * gtk/gtkfilechooserdialog.[ch]:
+       * gtk/gtkfilechooserwidget.[ch]: Deprecate
+       gtk_file_chooser_*_new_with_backend(), since GIO is already used
+       directly. Fixes #545976.
+
 2008-08-04  Carlos Garnacho  <carlos@imendio.com>
 
        * gtk/gtk.symbols:
index 26284adafe45dce77b08da45a0f79c17dd209030..0c4a436b8d24ffe39aafa3b4f32437f61f4feac8 100644 (file)
@@ -1446,17 +1446,21 @@ gtk_file_chooser_unselect_uri
 #if IN_FILE(__GTK_FILE_CHOOSER_DIALOG_C__)
 gtk_file_chooser_dialog_get_type G_GNUC_CONST
 gtk_file_chooser_dialog_new
+#ifndef GTK_DISABLE_DEPRECATED
 gtk_file_chooser_dialog_new_with_backend
 #endif
 #endif
+#endif
 
 #if IN_HEADER(__GTK_FILE_CHOOSER_WIDGET_H__)
 #if IN_FILE(__GTK_FILE_CHOOSER_WIDGET_C__)
 gtk_file_chooser_widget_get_type G_GNUC_CONST
 gtk_file_chooser_widget_new
+#ifndef GTK_DISABLE_DEPRECATED
 gtk_file_chooser_widget_new_with_backend
 #endif
 #endif
+#endif
 
 #if IN_HEADER(__GTK_FILE_CHOOSER_BUTTON_H__)
 #if IN_FILE(__GTK_FILE_CHOOSER_BUTTON_C__)
@@ -1464,7 +1468,9 @@ gtk_file_chooser_button_get_title
 gtk_file_chooser_button_get_type G_GNUC_CONST
 gtk_file_chooser_button_get_width_chars
 gtk_file_chooser_button_new
+#ifndef GTK_DISABLE_DEPRECATED
 gtk_file_chooser_button_new_with_backend
+#endif
 gtk_file_chooser_button_new_with_dialog
 gtk_file_chooser_button_set_title
 gtk_file_chooser_button_set_width_chars
index 4c9904f92a5314755b6d830040dc2aa14b5afb54..1e6519b9c8367abab3e68349758c94b2811e0bf4 100644 (file)
@@ -137,7 +137,6 @@ struct _GtkFileChooserButtonPrivate
   GtkTreeModel *model;
   GtkTreeModel *filter_model;
 
-  gchar *backend;
   GtkFileSystem *fs;
   GFile *old_file;
 
@@ -646,23 +645,13 @@ gtk_file_chooser_button_constructor (GType                  type,
 
   if (!priv->dialog)
     {
-      if (priv->backend)
-       priv->dialog = gtk_file_chooser_dialog_new_with_backend (NULL, NULL,
-                                                                GTK_FILE_CHOOSER_ACTION_OPEN,
-                                                                priv->backend,
-                                                                GTK_STOCK_CANCEL,
-                                                                GTK_RESPONSE_CANCEL,
-                                                                GTK_STOCK_OPEN,
-                                                                GTK_RESPONSE_ACCEPT,
-                                                                NULL);
-      else
-       priv->dialog = gtk_file_chooser_dialog_new (NULL, NULL,
-                                                   GTK_FILE_CHOOSER_ACTION_OPEN,
-                                                   GTK_STOCK_CANCEL,
-                                                   GTK_RESPONSE_CANCEL,
-                                                   GTK_STOCK_OPEN,
-                                                   GTK_RESPONSE_ACCEPT,
-                                                   NULL);
+      priv->dialog = gtk_file_chooser_dialog_new (NULL, NULL,
+                                                 GTK_FILE_CHOOSER_ACTION_OPEN,
+                                                 GTK_STOCK_CANCEL,
+                                                 GTK_RESPONSE_CANCEL,
+                                                 GTK_STOCK_OPEN,
+                                                 GTK_RESPONSE_ACCEPT,
+                                                 NULL);
 
       gtk_dialog_set_default_response (GTK_DIALOG (priv->dialog),
                                       GTK_RESPONSE_ACCEPT);
@@ -685,9 +674,6 @@ gtk_file_chooser_button_constructor (GType                  type,
       g_free (current_folder);
     }
 
-  g_free (priv->backend);
-  priv->backend = NULL;
-
   g_signal_connect (priv->dialog, "delete_event",
                    G_CALLBACK (dialog_delete_event_cb), object);
   g_signal_connect (priv->dialog, "response",
@@ -834,8 +820,7 @@ gtk_file_chooser_button_set_property (GObject      *object,
       break;
 
     case GTK_FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND:
-      /* Construct-only */
-      priv->backend = g_value_dup_string (value);
+      /* Ignore property */
       break;
 
     case GTK_FILE_CHOOSER_PROP_SELECT_MULTIPLE:
@@ -2755,6 +2740,7 @@ gtk_file_chooser_button_new (const gchar          *title,
  * Returns: a new button widget.
  * 
  * Since: 2.6
+ * Deprecated: 2.14
  **/
 GtkWidget *
 gtk_file_chooser_button_new_with_backend (const gchar          *title,
@@ -2767,7 +2753,6 @@ gtk_file_chooser_button_new_with_backend (const gchar          *title,
   return g_object_new (GTK_TYPE_FILE_CHOOSER_BUTTON,
                       "action", action,
                       "title", (title ? title : _(DEFAULT_TITLE)),
-                      "file-system-backend", backend,
                       NULL);
 }
 
index 4d9311726f5c66b37abe0b6e3673f023b4d852a6..b57209c84cba752534f0b07b9ad69087211db0c2 100644 (file)
@@ -69,9 +69,13 @@ struct _GtkFileChooserButtonClass
 GType                 gtk_file_chooser_button_get_type         (void) G_GNUC_CONST;
 GtkWidget *           gtk_file_chooser_button_new              (const gchar          *title,
                                                                GtkFileChooserAction  action);
+
+#ifndef GTK_DISABLE_DEPRECATED
 GtkWidget *           gtk_file_chooser_button_new_with_backend (const gchar          *title,
                                                                GtkFileChooserAction  action,
                                                                const gchar          *backend);
+#endif /* GTK_DISABLE_DEPRECATED */
+
 GtkWidget *           gtk_file_chooser_button_new_with_dialog  (GtkWidget            *dialog);
 G_CONST_RETURN gchar *gtk_file_chooser_button_get_title        (GtkFileChooserButton *button);
 void                  gtk_file_chooser_button_set_title        (GtkFileChooserButton *button,
index 6f22139da2d3c8ca601ea873cca36ad36f0d60f7..bc6b2ee798cbcb97f7cb154d3d3b133e48bf6fcf 100644 (file)
@@ -11010,11 +11010,9 @@ list_mtime_data_func (GtkTreeViewColumn *tree_column,
 }
 
 GtkWidget *
-_gtk_file_chooser_default_new (const char *file_system)
+_gtk_file_chooser_default_new (void)
 {
-  return  g_object_new (GTK_TYPE_FILE_CHOOSER_DEFAULT,
-                       "file-system-backend", file_system,
-                       NULL);
+  return g_object_new (GTK_TYPE_FILE_CHOOSER_DEFAULT, NULL);
 }
 
 static void
index d4fbda7426de642133cef68df9884ade7786f73a..e6eabefefc5df4392c927ce12878ca85a7474a7f 100644 (file)
@@ -33,7 +33,7 @@ G_BEGIN_DECLS
 typedef struct _GtkFileChooserDefault      GtkFileChooserDefault;
 
 GType      _gtk_file_chooser_default_get_type (void) G_GNUC_CONST;
-GtkWidget *_gtk_file_chooser_default_new      (const char *file_system);
+GtkWidget *_gtk_file_chooser_default_new      (void);
 
 G_END_DECLS
 
index c180a05c2a6d88864094fd15b6d5856afa946b8f..93f71c15e63ebc719b00faf070d3f9a4556f50cc 100644 (file)
@@ -466,7 +466,6 @@ gtk_file_chooser_dialog_new_valist (const gchar          *title,
   result = g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG,
                         "title", title,
                         "action", action,
-                        "file-system-backend", backend,
                         NULL);
 
   if (parent)
@@ -533,6 +532,7 @@ gtk_file_chooser_dialog_new (const gchar         *title,
  * Return value: a new #GtkFileChooserDialog
  *
  * Since: 2.4
+ * Deprecated: 2.14
  **/
 GtkWidget *
 gtk_file_chooser_dialog_new_with_backend (const gchar          *title,
index e792fd74aec072d4da85b29c1f81b0619b69b469..d79f6f89a71aed25e185bb30976fe6aaab4317d6 100644 (file)
@@ -59,12 +59,15 @@ GtkWidget *gtk_file_chooser_dialog_new              (const gchar          *title
                                                     GtkFileChooserAction  action,
                                                     const gchar          *first_button_text,
                                                     ...) G_GNUC_NULL_TERMINATED;
+
+#ifndef GTK_DISABLE_DEPRECATED
 GtkWidget *gtk_file_chooser_dialog_new_with_backend (const gchar          *title,
                                                     GtkWindow            *parent,
                                                     GtkFileChooserAction  action,
                                                     const gchar          *backend,
                                                     const gchar          *first_button_text,
                                                     ...) G_GNUC_NULL_TERMINATED;
+#endif /* GTK_DISABLE_DEPRECATED */
 
 G_END_DECLS
 
index bb0792117f96f70d4af094491b2e11091407e228..3119ce11df34da198d89e31a8daafff8cbde27bb 100644 (file)
@@ -100,7 +100,7 @@ gtk_file_chooser_widget_constructor (GType                  type,
 
   gtk_widget_push_composite_child ();
 
-  priv->impl = _gtk_file_chooser_default_new (priv->file_system);
+  priv->impl = _gtk_file_chooser_default_new ();
   
   gtk_box_pack_start (GTK_BOX (object), priv->impl, TRUE, TRUE, 0);
   gtk_widget_show (priv->impl);
@@ -181,6 +181,7 @@ gtk_file_chooser_widget_new (GtkFileChooserAction action)
  * Return value: a new #GtkFileChooserWidget
  *
  * Since: 2.4
+ * Deprecated: 2.14
  **/
 GtkWidget *
 gtk_file_chooser_widget_new_with_backend (GtkFileChooserAction  action,
@@ -188,7 +189,6 @@ gtk_file_chooser_widget_new_with_backend (GtkFileChooserAction  action,
 {
   return g_object_new (GTK_TYPE_FILE_CHOOSER_WIDGET,
                       "action", action,
-                      "file-system-backend", backend,
                       NULL);
 }
 
index 1dedeb7a430d89fdfcbb581eef9d2e8a8a68c517..333531f573c5d5a4169df89cc9c64b660e2a0ca3 100644 (file)
@@ -55,8 +55,13 @@ struct _GtkFileChooserWidgetClass
 
 GType      gtk_file_chooser_widget_get_type         (void) G_GNUC_CONST;
 GtkWidget *gtk_file_chooser_widget_new              (GtkFileChooserAction  action);
+
+
+#ifndef GTK_DISABLE_DEPRECATED
 GtkWidget *gtk_file_chooser_widget_new_with_backend (GtkFileChooserAction  action,
                                                     const gchar          *backend);
+#endif /* GTK_DISABLE_DEPRECATED */
+
 G_END_DECLS
 
 #endif /* __GTK_FILE_CHOOSER_WIDGET_H__ */